//
//  CWCLeftImgCell.m
//  ChuanNews
//
//  Created by dllo on 16/4/26.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CWCLeftImgCell.h"
#import "BaseHeader.h"
@implementation CWCLeftImgCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgViewA = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgViewA];
        self.imgViewB = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgViewB];
        self.imgViewC = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgViewC];
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        
        [self jxl_setDayMode:^(UIView *view) {
            CWCLeftImgCell *cell = (CWCLeftImgCell *)view;
            cell.backgroundColor = [UIColor whiteColor];
            cell.contentView.backgroundColor = [UIColor whiteColor];
            cell.titleLabel.backgroundColor = [UIColor whiteColor];
            cell.titleLabel.textColor = [UIColor blackColor];
            
        } nightMode:^(UIView *view) {
            CWCLeftImgCell *cell = (CWCLeftImgCell *)view;
            cell.backgroundColor = [UIColor blackColor];
            cell.contentView.backgroundColor = [UIColor blackColor];
            cell.titleLabel.backgroundColor = [UIColor blackColor];
            cell.titleLabel.textColor = [UIColor whiteColor];
            }];

    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.imgViewA.frame = CGRectMake(5, 5, 120, 80);
    self.imgViewB.frame = CGRectMake(5, 90, 120, 80);
    self.imgViewC.frame = CGRectMake(130, 5, WIDTH - 130 - 5 , 170);
    self.titleLabel.frame = CGRectMake(5, 170, WIDTH - 10, 25);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
